import request from '@/utils/request'

// 用户状态修改
export function changeCraneStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/equipment/crane/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询天车信息列表
export function listCrane(query) {
  return request({
    url: '/equipment/crane/list',
    method: 'get',
    params: query
  })
}

// 查询天车信息详细
export function getCrane(id) {
  return request({
    url: '/equipment/crane/' + id,
    method: 'get'
  })
}

// 新增天车信息
export function addCrane(data) {
  return request({
    url: '/equipment/crane',
    method: 'post',
    data: data
  })
}

// 修改天车信息
export function updateCrane(data) {
  return request({
    url: '/equipment/crane',
    method: 'put',
    data: data
  })
}

// 删除天车信息
export function delCrane(id) {
  return request({
    url: '/equipment/crane/' + id,
    method: 'delete'
  })
}

